class PetDog {
    public String name;//名字
    public String color;//颜⾊

    // 狗的属性
    public void barks() {
        System.out.println(name + ": 旺旺旺~~~");
    }

    // 狗的⾏为
    public void wag() {
        System.out.println(name + ": 摇尾巴~~~");
    }
}

public class Main{
    public static void main(String[] args) {
        PetDog dogh = new PetDog();     //通过new实例化对象
        dogh.name = "阿⻩";
        dogh.color = "⿊⾊";
        dogh.barks();
        dogh.wag();

        PetDog dogs = new PetDog();
        dogs.name = "小黑";
        dogs.color = "⻩⾊";
        dogs.barks();
        dogs.wag();
    }
}
